<!-- Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// -->
<!DOCTYPE html>
<title>Compatibility Tests</title>
<script src="../../../closure/base.js"></script>
<script src="test_js_deps-runfiles.js"></script>
<!--
  InboundRsaEncryptPgp10_0_0_674 Tests for:
    3des.sha384.zlib.asc
    aes128.md5.zip.asc
    aes192.sha256.uncompressed.asc
    aes256.sha384.zip.asc
    cast5.sha512.uncompressed.asc
-->
<textarea id="InboundRsaEncryptPgp10_0_0_674">
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBB/0euzvEFRGiWJNXD5vvDvasRBSgqv+6Ulghgdww
52gFFim/0euBkc9/5XhLvjutxktdVWwMMVW8SU198WqHhH+aJc55f6XJfqVxZKaa
89IpUb+V2StqZ1uOpJHZMVMQT1FL2QI/H3xtdBLmQ61jYOBH3sfHhDYfwqJjj8Eg
pIVoOcxVFGPkmtB32saaAaCmRzY3m3rfb81j5W8GvGKumug3tjFIREkWIPJhNZ0a
K9c6VqJ+fNOoHgJZa1+3Cm3nIPza8nHb8L/N4lfkBwNLJoUlDrbrJa20FH4GBIf/
FcjoNRLLLZTLwhUwFaXHBJN32HeJE95Un7JudN8ghJLik0Gv0kIBnEzhGrUL7fvA
3Zkx1Ab/M86vjEouV83F/UIDfLHcWB/fPtIyT9yykzEb+tT3UlMh+miR4iSbOy9o
pOZ9fVZh8gU=
=BIOC
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBCAC4GnRNvJix0QjchqgbCU/PYbp3NtrmwlBu8Ivr
8g2g4R6v7fZtl3oAfG8s0e4NHtmoF9FzIf6LdBDDFdDq/jEqhMVOAQRmmOIIChp+
K598t5KP0FW9tP8iVyY8QCrTK8FObG6l8dgidcd4fCGIYJnFhvvlhbnH8mw2x1Bk
7Q0baaz30rOueQeaDVsUi71b6kT34C3vjH420goigVztPdSzijcUkPevui9l66LN
GHQ8dZg/q53jUeMg4cskrHX7BBeF1imNVioL/iXwlYT4vmwp9LZSUGrR2/IaZwNX
izz6Cv4EMOHzN4RF0yYvfKCGTFtH03zyo2y2uLWKH4WJ42MQ0kQBBGRVn+9ocHBT
RJ3msAqxkE+5+z5KObd5Lw+6qFG8PVsNmZqSCjSmZAmMYtAKXlgPJdGxVwDG8lDq
LXlDUuoyqGSclw==
=hr/o
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBCACY8qhQaOP5NcbiUtPa7P9w9uSJQSwcp7yL7n64
Zo3yOKD4DedmT6a17L774t9UPsKlAMA5m2bkMfbq2gq0fqQVr+G0/c9/zaDRiD/3
bYAfe/MPNPmyf593U5AE7ClPhVWmzEhtEI+o/jP//FGlZY+XSa8M/3SkNzL1fc5B
pYb/78xliSddqkK7wcj/E+DChF8LvLZ2aCBucjptm2j7S+ocsYIC+AXhLjoAPSJU
k5mlTil4UfGmSnenpEsAlKaFnLIpUIWILgr5u3hbrTEm/mHgPvun/UKbrZ+buzQZ
UysmTH4zRIhtMoUHFUgSYSOmz8VmcJgS7BrUuhBgMGw4BL8c0kQBOoRezAmzbPzX
K0UI8ywc0yzslmnYrTx6yCIg9vgsUH9XzhpoWTLmxThnr7A7egJghCBMKdplYINf
udXT81/3oG5BUQ==
=rtaa
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBCACVj2uKPfT9zAOjFUsH8OuV4bBaEFBaOQfrpHOJ
1cude4SYzz1V5+tYzYvNlCSBJ1ljLW5poKixSRhqa0vQZKfmY6H2oYeXVlY+8B9E
ZfTKStkhTxccAW2/0atL0USwmiq4/w8gIh9KRxZP44DkVzNMqM4PXUvsIuSTAzIO
MH4IN3jrt1nZgBmCWZi6BwcXkX9Rtb13GAU+WhqXgxP1WYYRr1OHfIkn4F5x4RXF
5G0qF8i17LNVFDqxRs2bClGNrSr0xhVM6pavplLpqUnOz3EWPZ1lu7wQZWf/qXJ0
QvXhtAo6ztQMlh33fl/frbcr/Jzg81V9UGwbo7OI0CCyb9440kQB9T0Rx6omEqty
Yp3qNnhwlrRs3lkYaMM+z/06rrzpn6ucZggQHD4ZCK8ZHYx/FSpYJ5li6jOOPfOc
Ub0u15hwyyBnFA==
=DuYZ
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBCACifnnB4vb6x2bEmih4niw6G/Q2tAM/jKfun3F/
0AuJ7lR+RB6ZSPsM9i6m5vPkbwAJlWhc51BZ87SsAZtdgWOGDbuaBYzPQ3mlzJX/
AeiemNpBJr0yNEr0Tu/mPwtNnu8LVgntA9dscxvHKlBOSoMvs63sH0naVi0zhCbg
Ke0g9znjygnBXkc7IhWkvySn/82QSKVhilMNlzCgshCIF5L8HAysW13sb0YgNV+2
tbDw4+WQc6OJqobA6quloy71ncZCluf6GbIvEWGjpzWtf8U4T5vgUubt8z1g64Je
g3xgn5tXJEBLsclyOtR/TjPvQVgpufvzTcSt9pwSBz6wid0f0jwB2iXt+MDa7ASJ
EvDBgGcP1xahPQFPloCYhiN5+MTVF5CwAEpV9kL55ZlflanLNSfAJfDvygnle5Nw
l/A=
=5lk7
-----END PGP MESSAGE-----
</textarea>
<!--
TODO(evn): Fix IDEA and move this test back. (idea.sha.zlib.asc).
-----BEGIN PGP MESSAGE-----
Version: PGP Command Line v10.0.0 (Build 674) (Linux)

qANQR1DBwEwDIyUnH5W/hqEBB/96YWzT39JCpC71xHnmSYCSCM32QFvikS8wuxQO
9e618KtW7gfWaZxSQsNfykFMhfkkbQcp5I5Dg6L7C9kqrnAG7XPF11S2aYYHG5t1
dcgItN/YO1y8wCq6DZ7c4wh13wHhoZfAEWbxbXOcgWiKUNmnvq9W6I2VWYHsfBSj
x2qNnojH1SM8bX/EjPhUUx4WEKOhWFc7nezg7/8VOAfyGtJMUtNsIc9ekeRJNeCR
a4VPVtApssd3uDMPBiBgPtS6VuuHUlEUXOaUeGVL5vZzquIaE1MSSPTPWuAg3QEO
X0vO+iPdpDu5EHs5VoCZ/WMPWNa+WWY3C4db/gl9CBq6u2Wa0kIBMMqfuwSLW40a
bLGSgVzkPYbWvZhAPOwuH0VNTkbBBr3DHNSM6QGPyjHN2Q3sddrhiFt7A41wM8um
y/FL9GJQv3k=
=vm1f
-----END PGP MESSAGE-----
-->
<!--
  InboundRsaEncryptGnupg2_1_0beta3 Tests for:
    3DES.SHA1.ZIP.asc
    AES192.SHA224.ZLIB.asc
    AES256.SHA256.Uncompressed.asc
    AES.SHA384.ZIP.asc
    AES.SHA512.ZLIB.asc
    BLOWFISH.MD5.Uncompressed.asc
    CAST5.SHA1.ZIP.asc
-->
<textarea id="InboundRsaEncryptGnupg2_1_0beta3">
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.1.0beta3 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQgAioSQeowOqYeUfhSa/J9KdmU8f1bqxeUS+vB931gl1YQL
SiZkMVkFcok+nZFA+9Q3MntdEvWLrFRaoOU79duEmt963yxjHh02i+9kvbac3CW2
JfljlyPIpPND7ksVDLLG5n7RKy7ZMG4K4WALWNq7GyVNLERCGGQ+qpfxjbWeWotq
rOdzKBgebPX/h3+Toif6R3lL1ST2V1ufKMOcxZljGQbl5+XCyw2TMazitno8Yf1b
cXH7ocshnjmvu/0zGpyqoDF4JJlV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+H91Pz3md+W6H969I1AXWYpTD7ielMKCIdclVJ
8wbuLapIId+P0cwH1mL+ixkjdr7hM0H8GrHOKtYG6OkAyWIce+0=
=H6oC
-----END PGP MESSAGE-----
</textarea>
<!--
  InboundRsaEncryptGnupg1_4_11 Tests for:
    3DES.SHA512.ZLIB.asc
    AES192.SHA384.ZIP.asc
    AES256.SHA256.Uncompressed.asc
    AES.SHA224.ZLIB.asc
    BLOWFISH.SHA1.ZIP.asc
    CAST5.MD5.Uncompressed.asc
-->
<textarea id="InboundRsaEncryptGnupg1_4_11">
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQgAqbwswoFj74SdQZNLE/yUDV2tmNBmMgBIwSVTg3Rn0hUT
pFsxeEs/uM7GIurwXeiqja5dZAHaLIqCEnH+E1D1+CHB6ndqYnvro/hfk1AnT2gS
SjTmUEsYPgIMSX3rKCtZS/pb9JxvrhodNePZogAvgNE4lwu6zqNmEe8yKGs5wFiL
TtDw/XD29e/3NSrWHd0TKyERNuM3TR0K7zjJcSFAV2VGoXdXcZEgZXUzCqnAOboi
G/KTgPS4p0Gm81Yt3mEMl/XcW3x7dcFbK7uT4rZQVVWukYgQHMSFY4boJcA+UwuS
Fp9e2d/DoYWDlkde43+QJ4/FNAMGwzn5I5LfTyhoG9I7AUmTdjb70bfOyHk8d8oG
4o4zSSr+f3ix2PN3q3Hcp/5UDJx8PR2EqbwByLm1bAx01RZGoBtYDhZdu3I=
=ME+d
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQf/bRV1Hn0enCwM7oTy9381kSTC/PKATJH4za6uJsReTWo3
tQNizwBF0oa5ZEq36OSB3oOcmqmdF5asUCXX1/hR5/kxqnTrhMs4hqrgXj+rQkCf
ecrp/LMceiVCHcgav7j4eLF2YABE+ABAHmyyi7uiZJVV/Y8EkCL7bh98ypUxXCVW
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FWtt0ptZ0JmInBX/eU1gftEydU96wWLGJn9HzPr
byI9IWOMI3d5eVxCHHDlqgHiSLYdEMHZZQ8e01AUAIQt7PkE8gywOGfpkCP00Zcx
PNtES/u/qg3YmAMa7JCsMlu+sU6l076Tb8HV8RnSCNJDAaIemQkcjpyB4cqYLP4W
knwSdO5eZmAVZCXSd4FlvA6zmIel7dTeu8QEht3D+492+1b4xuS2sapDWsctdTAZ
ZK0eBg==
=v6ko
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQgApvhFQD1nK7fhjNLTtyZnXKqdhBfj/X8Jfy+qe3sVjwcM
HB0VqpJz2fQ92QcMA9c4teg/p72JTldxow1iaiJgGYUW4mGeXX1IvnV04jO1NaZL
/ZECPjcgmtjUePzyS/tWZ+am9ag0iY/Q1G4PqlgtWxI3XWGKk/fDcUp7suopNTD3
9xADS//cC4OMq14Pgd5LN9LYyoj51fCEN671Yz3//DfRUqlpKM05apPE1u8wHF3b
svNOjIXN3eqa4RxZFzP8xcGeIcERw+aWH/zi5ffmHIMgd5huiKfO70mmXZLQPj3l
SbHL3Gq5B4ryzBV6zUu8LOrv/YUGUik8h3lFEaZqwdI1AfrZ3VQNN30G/VE+iJxT
2KFIFVt4ktH5eYJ4a49f0KXNyWBKkBrhj0QfSBbqBrClyS+dcjY=
=TXu/
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQf/T4OLPgmLU6T+PCT3NEUuIGO1/Sww+2c6qsx1cLMCe5p1
U8fgja4qAZc0b9Nao4qxLzJajoQL5dEH66lhrFNcPYoi3iug2766MD5ZklQH1wzC
gM6ZmwzgxnG+QAHrktB7h9SfmxTBf51Sf0BuxBhmWdOO4BTbfhkXHEZXlHw/k6hm
AycJO1G2B8WKh5J935mqOHQPzOpmDCUGX5hWm6rjwQciSjGnhXqp2paLa/FIKTm4
dv+5TGINdW2KEi59IiJVmF79SoDg71bg6socRLPOBETY5Xg3s76Y6TSUKZL79Zky
CUy+vJlOE13cX5h3pl1dK2BMhgpy3zrDCF7I8AfIPNIxAUuy0u4ywgh0/bIzsoNr
n0SnSiGPKK39YtzHg3hajfFUJu093VKahZbClIOmuxQtfA==
=Ir/t
-----END PGP MESSAGE-----
</textarea>
<!--
  InboundRsaEncryptGnupg2_0_17 Tests for:
    3DES.MD5.Uncompressed.asc
    AES192.SHA1.ZIP.asc
    AES256.SHA224.ZLIB.asc
    AES.SHA384.Uncompressed.asc
    BLOWFISH.SHA512.ZIP.asc
    CAST5.MD5.ZLIB.asc
-->
<textarea id="InboundRsaEncryptGnupg2_0_17">
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.17 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQf+NaZdd6Rs3YAYrNyqmtr2ZspCrIZPZYbIR02ObLOXC0SF
Z8NON7OaI8DsHAfyDwqukzb6JwS8Vzg5lE2O27bvXIR1IpWucz5uqFdHpxqUgf0P
6hOESH+pL4yS+NU5TzDf7HFby+8srLjfC4Ppml4WVD9EjzyVNpTJNTwg1k8XLDmx
sp3ttUNHb2sxKK52ovCxDdSgd/GS43dZ2MxZPS+o5IdxdKsVGSu3wqo3HILWDRYC
cbToWgIT2McwdaS97nLVINUAkLsMx6alSn6Rc05x7omct6Iuwd9zIZH/f2wwzaj1
YozrQOXFht0G8t84Tzf+4dHtsLG0xHVb08M0RUKXrdIxAXOZwQ8QCnqeW388p8xs
EimOf/a7yVnK/EJpqSzbjM9aS1jQC28xdNK7M9jwPRKBbA==
=R3Gm
-----END PGP MESSAGE-----
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.17 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQgAk4hSlSX6O4FdZlVo4gbrpmMUhiySST2bbvipt+WbBZo5
A8VadC3JUjdsAYhRl5ieQkounqBkPycPsDgwnDzB8hStJEHtx0wuR4UM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jo8LxGC5QP/u3s5K/7qFsoMalpH1rE
ey3p/pVnLSInbILqQnvg94Ps9wQ7PBwl0Li/1YgLsFN1QXRpzjkc+9XpBzY9J6uE
E3ZfH2Bm27rpHsS+PaFTKnMS4bRRLANSCyXH06u2CBGYMKgiRYqHVIro0vZ70t8M
8o4L2rD9TZct6fHBHSP8gF9Uhi3GW2nT4G44IHC8YNI7AcR2cl3mu6b1VUMGhRZL
XqK648IMIjf8Ic0omn1m3jkr/SdCDVSTtqZH7SXblLtIPQ0MiIYON8esv3A=
=DBjN
-----END PGP MESSAGE-----
</textarea>
<textarea id="InboundRsaSignGnupg1_4_11">
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

jA0EAwMCfczlcZZg7tRgycCNi57omz2PSEMp7NQvYkq1A9wwb78bXIU02SmGgo+j
H15ogS7m7Qk6uwi8MXqXQ3u4GgizmvdXAlQ/WGeg65owRyCqpVE7f0XmXpFBmIf4
dqsZZGJAMpsoHHl4dOo+lKRuVmS9KmWNnG8zPdLD4Pz8URdLxJCtNZHxlaP6M7BV
TzlH4hFEDJmfL1UTrXYQ/0NX1atKEvMd9qH4c/HPZUuD8uj39jZ4m4Geu1hsS1SN
LqEOCYb57DQrd/sg/kFH/gosRgYNAtlYHZwHaFsXSW0ORuRm3ODE8fjT+SlDth1g
hiDQojQ9sM8RRwdHEP2eNNuBZui8UfIqbvPZ7cH9TfeCfnAk6S3C8jWkSwvP/mqe
uISafsJDIfOVLDBZ+a1GQTPdTXvXBPO4iL00V4VgZXzSMvyLxuV2FJe8IneIl/uT
3YUiEg3rFgUqeUALwWh8
=DGn3
-----END PGP MESSAGE-----

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)

hQEMAyMlJx+Vv4ahAQgAkOXalhkAxJ0M8kEiS4reFdvvd+eAsScZRaTnQsrVXmXZ
5+F9B3w30jfFTUWML62Co7DplC/qvzYD7fqczXyWHzneSI3hmU4Pc9gZhdKeROdj
SjV98twa7WqN1wrFQlGl/0OpyYXN+wd32F+YAL4xajFiQOINA/59Jc1ZCRtLWkfm
NGWuceK+eon7egNyRnLIzFDC9REHjL+QxhylqVHE6yOaTFK0uATWqHYv9bVDWJ8J
pKG7cxDZGGCPnq9DFmIyoFoD7NdeV/0PLcjKlAntXB6VsIVtg8xeKBu7/HIJ2sM1
4c7DlXcMd8pmHinRV1zVWIi/cHk2U+OTalfVAH/gVNLAsgFy/JaWdjYcDhi9mqdh
AzMa2i3Lp4kuBZeER8zbLFBR6tv3o+0qplAb0KZ2zmgydjAj6/Rk1kpeyJpUFeyd
GHqU4sg8j8S4OrnaTEwzWhoXSKWjErj3yshqLv4pMPGcKjqmFFl3HA1rnOInzEmx
ANB86fQOcU2oQOB85Q1XJO59trNVifNWz7VhWc2y3Gh3ZSwN56NctVCtr/4NdXMQ
9MPHDbvreCMQ6XR04sgK1OIGtQJTCW0rOtXa11tB4QVTblxxA/rBorMRqg6q1Hbv
RuEgx6MYPYGMTh9uUeht0t8kLOfa3wePlscwBGlxBdDFVscBCZe85cChe3DjhmTE
BH4IQdNSVZoyMryL2+5RThNCiDPnsA8A8gdiodWxOQb5qMlWg+o3JRLQbZ8iEzYI
gp+XUjD/wKHDrGQM0JzTX7aKyTU+zePnQPj8cWYVMeBUKgEuUHin3vhnF4JjCow7
RBTtuV4RUjFr6VfKXCL986s8jEw=
=yXHx
-----END PGP MESSAGE-----
</textarea>
<script>
  goog.require('goog.async.DeferredList');
  goog.require('goog.testing.AsyncTestCase');
  goog.require('goog.testing.jsunit');
  goog.require('e2e');
  goog.require('e2e.openpgp.ContextImpl');
</script>
<script>
  var RSA_PRIVATE_KEY =
  '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' +
  'Version: GnuPG v1.4.11 (GNU/Linux)\n' +
  '\n' +
  'lQO+BFKFJ5kBCADgTy3vZ27fhfiFDUSsCx5ldIHwE1GbuZCm+WIhCH3ni2CL0lKY\n' +
  'AUNFWRcxeODlQlvYA2ti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+
  'AKrrwcfKZVmTq5XbPqNuCGTt8kka0DSlmqZrGiQU+7k4tVevNIItc39ag4eBC5HL\n' +
  'fHcH7dzpCojE41nsNUZgKc+o1TIYGNW0Ely5qg98Dh6DXomiXHPB91vZ+KXotgQ1\n' +
  '0dbmcYkBHwQYAQIACQUCUoUnmQIbDAAKCRCPZSaYwzCnKjH3B/wLNYyzcvh+tixv\n' +
  '5IFy+IuJoY6LiODoOeBSmbL3JiRzP9iV907GIVNDwCeDAXx8jWfQVIrhabELqREU\n' +
  'PZzsZDFC+Z5uMZ+XQVWuGbplHJ6/5CIm+YBYbOpx7eS1KNV3oglu27dGnO4TkxAq\n' +
  'MfmTOWGmwTvnFy33QlEKe7w4eMX8Y51+/n74i72N9p26F68QPoXJbmBSXZfO5E2r\n' +
  'VIq+rwOyOygbZcJ49nUWjNQYhZl5m4+nh5wWeWMQodcn6pnEej+JdjX2qieZOKJV\n' +
  'nFky5o5cDTLFkS9usxUXKW6ZpXtReawsdAktF1wByyZiHuizlPRN+w1eBO+wJYvD\n' +
  '/+yGzcqh\n' +
  '=no9X\n' +
  '-----END PGP PRIVATE KEY BLOCK-----';

  var RSA_PUBLIC_KEY =
  '-----BEGIN PGP PUBLIC KEY BLOCK-----\n' +
  'Version: GnuPG v1.4.11 (GNU/Linux)\n' +
  '\n' +
  'mQENBFKFJ5kBCADgTy3vZ27fhfiFDUSsCx5ldIHwE1GbuZCm+WIhCH3ni2CL0lKY\n' +
  'AUNFWRcxeODlQlvYA2ti+JALWjzlUYTpf02g3LfzBSIqdDn3JBwN6U12A0xwwSRs\n' +
  'KSRp8phn9yCyCTO7btbqZtGc29jrX/k6cbrBE8ln/9wlZVx8KVcpzDI4jhXjUwmM\n' +
  'JYvJqCHXRTe3kEGZkONfAeeIBfvs7t7Y/sv80RuXnlwMVMjEZKGRFlNQ5zqr8QQb\n' +
  'qh9MA7NeezIi890cQzii/+w6ta7X4/BnML4iud/aNiLYhpeZwEFqXHMwp+w8xHkk\n' +
  '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
  'MfcH/As1jLNy+H62LG/kgXL4i4mhjouI4Og54FKZsvcmJHM/2JX3TsYhU0PAJ4MB\n' +
  'fHyNZ9BUiuFpsQupERQ9nOxkMUL5nm4xn5dBVa4ZumUcnr/kIib5gFhs6nHt5LUo\n' +
  '1XeiCW7bt0ac7hOTECox+ZM5YabBO+cXLfdCUQp7vDh4xfxjnX7+fviLvY32nboX\n' +
  'rxA+hcluYFJdl87kTatUir6vA7I7KBtlwnj2dRaM1BiFmXmbj6eHnBZ5YxCh1yfq\n' +
  'mcR6P4l2NfaqJ5k4olWcWTLmjlwNMsWRL26zFRcpbpmle1F5rCx0CS0XXAHLJmIe\n' +
  '6LOU9E37DV4E77Ali8P/7IbNyqE=\n' +
  '=A9tz\n' +
  '-----END PGP PUBLIC KEY BLOCK-----\n';

  var context, asyncTest = goog.testing.AsyncTestCase.createAndInstall(document.title);
  function setUp() {
    localStorage.clear();
    context = new e2e.openpgp.ContextImpl();
    context.setKeyRingPassphrase('');
  }
  function runTestFor(version, assertionsCb) {
    var msgs = document.getElementById(version).value;
    var encryptedMsgs = msgs.match(/-----BEGIN[\s\S]*?END PGP MESSAGE-----/g);
    var results = goog.array.map(
      encryptedMsgs,
      function(msg) {
        return context.verifyDecrypt(function(_, cb) {  cb('a')}, msg).addCallback(
          function(vd) {
            return vd;
          });
      });
    // Let us wait 3 seconds per message.
    asyncTest.stepTimeout = encryptedMsgs.length * 2e3;
    asyncTest.waitForAsync('Waiting for decryptions.');
    goog.async.DeferredList.gatherResults(results).addCallback(goog.bind(
      assertionsCb, this, encryptedMsgs));
  }
  function testInboundRsa() {
    context.importKey(function(uid, cb) {
      cb('test');
    }, RSA_PRIVATE_KEY);

    var assertDecrypts = function(encryptedMsgs, all) {
      var plaintext = e2e.stringToByteArray('susheep\n');
      goog.array.forEach(all, function(r) {
        assertArrayEquals(plaintext, r.decrypt.data);
      });
      assertEquals(encryptedMsgs.length, all.length);
      asyncTest.continueTesting();
    };

    runTestFor('InboundRsaEncryptGnupg1_4_11', assertDecrypts);
    runTestFor('InboundRsaEncryptGnupg2_0_17', assertDecrypts);
    runTestFor('InboundRsaEncryptGnupg2_1_0beta3', assertDecrypts);
    runTestFor('InboundRsaEncryptPgp10_0_0_674', assertDecrypts);
  }

  function testInboundRsaSign() {
    context.importKey(function(uid, cb) {
      cb('test');
    }, RSA_PRIVATE_KEY);
    context.importKey(function(uid, cb) {
      fail("Should not call callback");
    }, RSA_PUBLIC_KEY);

    var assertCorrectlySigned = function(encryptedMsgs, all) {
      goog.array.forEach(all, function(r) {
        var plaintext = e2e.stringToByteArray('signed');
        assertArrayEquals(plaintext, r.decrypt.data);
        assertEquals(1, r.verify.success.length);
        assertEquals(0, r.verify.failure.length);
        asyncTest.continueTesting();
      });

    }
    runTestFor('InboundRsaSignGnupg1_4_11', assertCorrectlySigned);
  }
</script>
